/*
 * XML Type:  cascade-type
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML cascade-type(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
public class CascadeTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType
{
    
    /**  */
	private static final long serialVersionUID = -3948241691603419605L;


	public CascadeTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CASCADEALL$0 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "cascade-all");
    private static final javax.xml.namespace.QName CASCADEPERSIST$2 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "cascade-persist");
    private static final javax.xml.namespace.QName CASCADEMERGE$4 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "cascade-merge");
    private static final javax.xml.namespace.QName CASCADEREMOVE$6 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "cascade-remove");
    private static final javax.xml.namespace.QName CASCADEREFRESH$8 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "cascade-refresh");
    
    
    /**
     * Gets the "cascade-all" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType getCascadeAll()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEALL$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "cascade-all" element
     */
    public boolean isSetCascadeAll()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CASCADEALL$0) != 0;
        }
    }
    
    /**
     * Sets the "cascade-all" element
     */
    public void setCascadeAll(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType cascadeAll)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEALL$0, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEALL$0);
            }
            target.set(cascadeAll);
        }
    }
    
    /**
     * Appends and returns a new empty "cascade-all" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType addNewCascadeAll()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEALL$0);
            return target;
        }
    }
    
    /**
     * Unsets the "cascade-all" element
     */
    public void unsetCascadeAll()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CASCADEALL$0, 0);
        }
    }
    
    /**
     * Gets the "cascade-persist" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType getCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEPERSIST$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "cascade-persist" element
     */
    public boolean isSetCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CASCADEPERSIST$2) != 0;
        }
    }
    
    /**
     * Sets the "cascade-persist" element
     */
    public void setCascadePersist(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType cascadePersist)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEPERSIST$2, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEPERSIST$2);
            }
            target.set(cascadePersist);
        }
    }
    
    /**
     * Appends and returns a new empty "cascade-persist" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType addNewCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEPERSIST$2);
            return target;
        }
    }
    
    /**
     * Unsets the "cascade-persist" element
     */
    public void unsetCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CASCADEPERSIST$2, 0);
        }
    }
    
    /**
     * Gets the "cascade-merge" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType getCascadeMerge()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEMERGE$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "cascade-merge" element
     */
    public boolean isSetCascadeMerge()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CASCADEMERGE$4) != 0;
        }
    }
    
    /**
     * Sets the "cascade-merge" element
     */
    public void setCascadeMerge(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType cascadeMerge)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEMERGE$4, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEMERGE$4);
            }
            target.set(cascadeMerge);
        }
    }
    
    /**
     * Appends and returns a new empty "cascade-merge" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType addNewCascadeMerge()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEMERGE$4);
            return target;
        }
    }
    
    /**
     * Unsets the "cascade-merge" element
     */
    public void unsetCascadeMerge()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CASCADEMERGE$4, 0);
        }
    }
    
    /**
     * Gets the "cascade-remove" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType getCascadeRemove()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEREMOVE$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "cascade-remove" element
     */
    public boolean isSetCascadeRemove()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CASCADEREMOVE$6) != 0;
        }
    }
    
    /**
     * Sets the "cascade-remove" element
     */
    public void setCascadeRemove(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType cascadeRemove)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEREMOVE$6, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEREMOVE$6);
            }
            target.set(cascadeRemove);
        }
    }
    
    /**
     * Appends and returns a new empty "cascade-remove" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType addNewCascadeRemove()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEREMOVE$6);
            return target;
        }
    }
    
    /**
     * Unsets the "cascade-remove" element
     */
    public void unsetCascadeRemove()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CASCADEREMOVE$6, 0);
        }
    }
    
    /**
     * Gets the "cascade-refresh" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType getCascadeRefresh()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEREFRESH$8, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "cascade-refresh" element
     */
    public boolean isSetCascadeRefresh()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CASCADEREFRESH$8) != 0;
        }
    }
    
    /**
     * Sets the "cascade-refresh" element
     */
    public void setCascadeRefresh(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType cascadeRefresh)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEREFRESH$8, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEREFRESH$8);
            }
            target.set(cascadeRefresh);
        }
    }
    
    /**
     * Appends and returns a new empty "cascade-refresh" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType addNewCascadeRefresh()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEREFRESH$8);
            return target;
        }
    }
    
    /**
     * Unsets the "cascade-refresh" element
     */
    public void unsetCascadeRefresh()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CASCADEREFRESH$8, 0);
        }
    }
}
